import React from 'react'
import shop from '../../../../assets/img/iconShop.png'
import yhui from '../../../../assets/img/yh.png'
import yhui1 from '../../../../assets/img/yh1.png'
import swipers from '../../../../assets/img/swiper1.png'
import { SearchBar, Grid, Tag,Tabs } from 'antd-mobile'
import { imgPre } from '../../../../request/http'
import './newhave.less'
import { withRouter } from 'react-router-dom'
function Newhav(props) {
  // console.log(props);
  let {newhav} =props
  return (
    <div>
                {/* 新人专享 */}
        <div className='nav'>
          <div className='new'>
            <Grid columns={3} gap={8}>
              <Grid.Item>
                <p>新人专享</p>
              </Grid.Item>
              <Grid.Item>
                <span>05</span><i>:</i>
                <span>20</span><i>:</i>
                <span>80</span>
              </Grid.Item>
              <Grid.Item>
                <a href="#">查看全部</a>
              </Grid.Item>

            </Grid>

          </div>
          <div className='shop'>
            <b>1重礼</b>
            <span>信任特价商品专区 <i>（限量供应，先到先得）</i></span>
            <div className='shops'>
            {newhav.map((item)=>{
              return(
                <div className='swiperShop' key={item.id}>
                <img src={imgPre+item.img} alt="" />
                <div className="price">
                  <h4>￥{item.market_price}</h4>
                  <p>￥{item.price}</p>
                  <span> <img src={shop} alt="" /></span>
                </div>
              </div>
              )
            })}
            </div>
          </div>
          <div className='shop2'>
            <b>2重礼</b>
            <span>新人通用50元礼券 <i>（下单立减，省了又省）</i></span>
             <div className='yhui'>
               <img src={yhui} alt=""  className='img1'/>
               <img src={yhui1} alt="" className='img2'/>
             </div>
          </div>
        </div>
    </div>
  )
}
export default withRouter(React.memo(Newhav))
